package com.example.tests;

import static org.hamcrest.Matchers.equalTo;
import com.example.utils.ListOf;
import static org.hamcrest.MatcherAssert.*;
import org.testng.annotations.Test;

public class FolderRemovingTests extends TestBase {
	
	@Test
	public void testFolderRemoving() {
		ListOf<String> oldList = app.getFolderHelper().getFolders();
        int index = getRandomIndex(oldList.size());
        app.getFolderHelper().deleteFolder(index);
        ListOf<String> newList = app.getFolderHelper().getFolders();
        assertThat(newList, equalTo(oldList.without(index)));
	}
}
